﻿using SetSailControl;
using SetSailControl.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SetSailView
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Frm_HOME : UserControl
    {
        public Frm_HOME()
        {
            InitializeComponent();
        }
        int nums = 1;

        void Frm_HOME_Paint(object sender, PaintEventArgs e)
        {
            Control c = sender as Control;
            Color[] cs = ColorExt.GetInternalColor((GradientColorsTypes)nums);
            ControlHelper.SetGDIHigh(e.Graphics);
            LinearGradientBrush lgb = new LinearGradientBrush(c.ClientRectangle, cs[0], cs[1], 20f);
            e.Graphics.FillRectangle(lgb, c.ClientRectangle);
        }

        private void Frm_HOME_Load(object sender, EventArgs e)
        {
            panel1.BackColor = ColorExt.GetInternalColor(TableColorsTypes.Red)[0];
            panel2.BackColor = ColorExt.GetInternalColor(TableColorsTypes.Green)[0];
            panel3.BackColor = ColorExt.GetInternalColor(TableColorsTypes.Blue)[0];
            panel4.BackColor = ColorExt.GetInternalColor(TableColorsTypes.Yellow)[0];
        }
    }
}
